import Cookie from "js-cookie";

const Token = "token"; //定义一个常量
//生成cookie
export function setToken(token) {
  Cookie.set(Token, token);
}
//获取cookie
export function getToken() {
  return Cookie.get(Token);
}
//删除
export function removeToken() {
  Cookie.remove(Token);
}

//生成播放歌曲
export function setSong(song) {
  Cookie.set("song", song);
}

//单曲插入播放歌单
export function setSg(song) {
  Cookie.set("souDan", song);
}

//获取播放歌曲
export function getSong() {
  return Cookie.get("song");
}

//删除播放歌曲
export function removeSong() {
  Cookie.remove("song");
}

//删除播放单曲
export function removeSg() {
  Cookie.remove("souDan");
}
